<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:p="http://primefaces.org/ui"
	xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/WEB-INF/templates/plantillaPrincipal.xhtml">
	<ui:define name="menu">
		<table width="900" cellpadding="0" cellspacing="0">
			<tr>
				<td width="900" height="40" style="border-bottom: 1px solid #2779AA">
				</td>
			</tr>
		</table>
	</ui:define>

	<ui:define name="content">
		<div class="formLogin">
			<f:view>
				<h1>#{msg.loginUsuarioTitulo}</h1>
				<div class="texto">
					<h:outputText value="#{msg.loginTexto1}" />
					<br /> <br />
				</div>

				<h:outputText value="#{msg.usuarioPasswordIncorrecto}"
					rendered="#{usuarioBean.loginIncorrecto}" style="color:red;" />
				<h:outputText value="#{msg.usuarioInhabilitadoTexto}"
					rendered="#{usuarioBean.usuarioInhabilitado}" style="color:red;" />

				<p:panel style="width:400px">
					<h:panelGroup>
						<h:form>
							<h:panelGrid width="350" columns="2" border="0">
								<h:outputText value="#{msg.emailUsuario}"
									style="font-weight:bold;" />
								<t:inputText id="email" value="#{usuarioBean.usuario.email}"
									size="27" required="true">
									<!-- <t:validateEmail /> -->
								</t:inputText>
								<h:outputText value=" " />								
								<t:message for="email" style="color:red" />
								<h:outputText value="#{msg.password}" style="font-weight:bold;" />
								<h:inputSecret id="pwd" value="#{usuarioBean.usuario.pwd}"
									size="27" required="true" />
								<h:outputText value=" " />
								<h:message for="pwd" style="color:red;display:inline" />								
								<h:panelGroup>
									<h:commandButton action="#{usuarioBean.loginUsuario}"
										value="#{msg.enviar}" ajax="false" />
								</h:panelGroup>
								<h:outputText value=" " />
							</h:panelGrid>
						</h:form>
						<br />
						<h:form>
							<h:commandLink value="#{msg.usuarioNuevo}" action="irRegistro" />
							<br />
							<h:commandLink value="#{msg.olvidoPassword}"
								action="irRecordarPwd" />
							<br />
							<h:commandLink value="#{msg.entrarAdmin}" action="irLoginAdmin" />

						</h:form>
					</h:panelGroup>
				</p:panel>
			</f:view>
		</div>
	</ui:define>
</ui:composition>
</html>